package com.carrentalssm.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.carrentalssm.dao.CarListDao;
import com.carrentalssm.entity.CarList;

//逻辑处理
@Service
public class CarListService {
	
	@Resource
	private CarListDao carListDao;
	
	//添加
	public int add(CarList carList) {
		return carListDao.add(carList);
	}
	
	//删除
	public int delete(String id) {
		return carListDao.delete(id);
	}
	
	//更新
	public int update(CarList carList) {
		return carListDao.update(carList);
	}
	
	//查询全部
	public List<CarList> selectAll() {
		return carListDao.selectAll();
	}
	
	//根据id查询
	public CarList selectById(String id) {
		return carListDao.selectById(id);
	}
	
	//查询还有库存的
	public List<CarList> selectHaveNumber() {
		return carListDao.selectHaveNumber();
	}

}
